﻿class EnemyShip extends MovieClip
{
	var speed;
	function onLoad()
	{
		_x = 700;
		_y = Math.random()*250 + 25;
		speed = Math.random()*7 + 7; 
	}
	function onEnterFrame()
	{
		_x -= speed;
		if(_x < -100)
		{
			this.removeMovieClip();
		}
		if(this.hitTest(_root.ship))
		{
			explode();
		}
	}
	function explode()
	{
		this.removeMovieClip();
	}
}
